<template>
    {{ title }}
    <button @click="age++">{{ age }}</button>
</template>

<script setup>
import { useAttrs } from 'vue';

const props = defineProps({
    title:String,
    age:Number
})
console.log(props.title, props.age);

const attrs = useAttrs();
console.log(16,attrs.name);
 

const emit = defineEmits(['load'])
emit('load','加载成功')
</script>

<!-- <script>
export default {
props:{
    title:String,
    age:Number
},
emits:['load'],
setup(props,context){
    console.log(12 ,props.title, props.age);
    context.emit('load','加载成功')
}


}

</script> -->